package com.bupt.jack.service.impl;

import java.util.List;

import org.hibernate.criterion.Example;

import com.bupt.jack.dao.GroupItemDao;
import com.bupt.jack.model.GroupItem;
import com.bupt.jack.service.GroupItemService;

public class GroupItemServiceImpl implements GroupItemService{
	
	private GroupItemDao groupItemDao;

	public GroupItemDao getGroupItemDao() {
		return groupItemDao;
	}

	public void setGroupItemDao(GroupItemDao groupItemDao) {
		this.groupItemDao = groupItemDao;
	}

	public List<GroupItem> findOnGroupItems(int pageNow,int pageSize) {
		// TODO Auto-generated method stub
		Example example = Example.create(new GroupItem());
		int firstResult = (pageNow-1) * pageSize;
		return this.groupItemDao.find(example, firstResult, pageSize);
	}
	
	
}
